// pages/index/plugin/clockin/clockin.js
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'

import { getChineseWeekday } from '../../utils/dateUtil';
const db = wx.cloud.database();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    avatar:'https://image.baidu.com/search/detail?adpicid=0&b_applid=11777477454209006151&bdtype=0&commodity=&copyright=&cs=1743854799%2C4215106006&di=7552572858984038401&fr=click-pic&fromurl=http%253A%252F%252Fmbd.baidu.com%252Fnewspage%252Fdata%252Fdtlandingsuper%253Fnid%253Ddt_4682374102698295872&gsm=1e&hd=&height=0&hot=&ic=&ie=utf-8&imgformat=&imgratio=&imgspn=0&is=314429047%2C4210675027&isImgSet=&latest=&lid=&lm=&objurl=https%253A%252F%252Fiknow-pic.cdn.bcebos.com%252Fa9d3fd1f4134970ae335f5b187cad1c8a6865dee%253Ffor%253Dbg&os=314429047%2C4210675027&pd=image_content&pi=0&pn=1&rn=1&simid=3475962561%2C484259250&tn=baiduimagedetail&width=0&word=%E5%A4%B4%E5%83%8F%E7%94%B7&z=',
    now_time: '',
    todayWeekday: '',
    current_address: [],
    addressInfo: '',
    status: 0, // 0-上班未打卡 2-下班未打卡 3-下班已打卡
    now_time_stop: '', // 上班打卡时间
    now_time_stop_end: '', // 下班打卡时间
    animationData: '', // 打卡动画栈
    loading: false,
    locationError: false,
    today: '', // 当前日期，用于判断是否隔天
    workTime: '09:00:00', // 上班时间
    offWorkTime: '18:00:00', // 下班时间
    allowedLocations: [], // 允许打卡的位置范围
    isInAllowedRange: false, // 是否在允许打卡范围内
    rangeCheckLoading: false, // 范围检查加载状态
    isLate: false, // 是否迟到
    isLeaveEarly: false, // 是否早退
    userInfo:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    
  },

  

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
   
  },

  /**
   * 获取用户位置
   */

});